package com.gree.scmservice.service;

import com.alibaba.fastjson.JSONObject;
import com.gree.common.entity.ReturnVo;
import com.gree.common.entity.SysApiRoleVo;
import org.nutz.lang.util.NutMap;

import java.util.List;

/**
 * 接口管理 service
 * Created by 180686 on 2021/3/16 20:26
 */
public interface GscmSysRoleApiService {

    /**
     * 分页查询
     * @param jsonObject
     * @return
     */
    NutMap displaySysApiRole(JSONObject jsonObject);

    /**
     * 新增接口
     * @param sysApiRoleVo
     * @return
     */
    ReturnVo insertSysApiRole(SysApiRoleVo sysApiRoleVo);

    /**
     * 修改接口
     * @param sysApiRoleVo
     * @return
     */
    ReturnVo updateSysApiRole(SysApiRoleVo sysApiRoleVo);

    /**
     * 删除接口
     * @param infoIds
     * @return
     */
    ReturnVo deleteApiRoleByIds(Long[] infoIds);

    /**
     * 根据接口ID查询虚拟用户
     * @param apiId
     * @return
     */
    List querySysApiUser(Long apiId);

    /**
     * 对接口添加虚拟用户
     * @param apiId
     * @param username
     */
    void insertSysApiUser(Long apiId,String username);

    int deleteSysApiUser(Long apiId,String username);

    int deleteSysApiUserByApiIDs(Long[] apiIds);
}
